<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<title>OpenCV: Unwrap two-dimensional phase maps</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon" />
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../tutorial-utils.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
   &#160;<span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../d3/d81/tutorial_contrib_root.html">Tutorials for contrib modules</a></li><li class="navelem"><a class="el" href="../../db/d74/tutorial_unwrap_phase_map.html">Phase Unwrapping tutorial</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Unwrap two-dimensional phase maps </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2>Goal </h2>
<p>In this tutorial, you will learn how to use the phase unwrapping module to unwrap two-dimensional phase maps. The implementation is based on <a class="el" href="../../d0/de3/citelist.html#CITEREF_histogramUnwrapping">[138]</a>.</p>
<h2>Code </h2>
<div class="fragment"><div class="line"><span class="comment">/*M///////////////////////////////////////////////////////////////////////////////////////</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //  By downloading, copying, installing or using the software you agree to this license.</span></div><div class="line"><span class="comment"> //  If you do not agree to this license, do not download, install,</span></div><div class="line"><span class="comment"> //  copy or use the software.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //                           License Agreement</span></div><div class="line"><span class="comment"> //                For Open Source Computer Vision Library</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> // Copyright (C) 2015, OpenCV Foundation, all rights reserved.</span></div><div class="line"><span class="comment"> // Third party copyrights are property of their respective owners.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> // Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><span class="comment"> // are permitted provided that the following conditions are met:</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //   * Redistribution&#39;s of source code must retain the above copyright notice,</span></div><div class="line"><span class="comment"> //     this list of conditions and the following disclaimer.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //   * Redistribution&#39;s in binary form must reproduce the above copyright notice,</span></div><div class="line"><span class="comment"> //     this list of conditions and the following disclaimer in the documentation</span></div><div class="line"><span class="comment"> //     and/or other materials provided with the distribution.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> //   * The name of the copyright holders may not be used to endorse or promote products</span></div><div class="line"><span class="comment"> //     derived from this software without specific prior written permission.</span></div><div class="line"><span class="comment"> //</span></div><div class="line"><span class="comment"> // This software is provided by the copyright holders and contributors &quot;as is&quot; and</span></div><div class="line"><span class="comment"> // any express or implied warranties, including, but not limited to, the implied</span></div><div class="line"><span class="comment"> // warranties of merchantability and fitness for a particular purpose are disclaimed.</span></div><div class="line"><span class="comment"> // In no event shall the Intel Corporation or contributors be liable for any direct,</span></div><div class="line"><span class="comment"> // indirect, incidental, special, exemplary, or consequential damages</span></div><div class="line"><span class="comment"> // (including, but not limited to, procurement of substitute goods or services;</span></div><div class="line"><span class="comment"> // loss of use, data, or profits; or business interruption) however caused</span></div><div class="line"><span class="comment"> // and on any theory of liability, whether in contract, strict liability,</span></div><div class="line"><span class="comment"> // or tort (including negligence or otherwise) arising in any way out of</span></div><div class="line"><span class="comment"> // the use of this software, even if advised of the possibility of such damage.</span></div><div class="line"><span class="comment"></span></div><div class="line"><span class="comment"> *  //</span></div><div class="line"><span class="comment"> //M*/</span></div><div class="line"></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html">opencv2/imgproc.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../d4/dd5/highgui_8hpp.html">opencv2/highgui.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="../../dd/dee/phase__unwrapping_8hpp.html">opencv2/phase_unwrapping.hpp</a>&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;fstream&gt;</span></div><div class="line"><span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="../../d2/d75/namespacecv.html">cv</a>;</div><div class="line"><span class="keyword">using namespace </span>std;</div><div class="line"></div><div class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* keys =</div><div class="line">{</div><div class="line">    <span class="stringliteral">&quot;{@inputPath | | Path of the wrapped phase map saved in a yaml file }&quot;</span></div><div class="line">    <span class="stringliteral">&quot;{@outputUnwrappedName | | Path of the unwrapped phase map to be saved in a yaml file and as an 8 bit png}&quot;</span></div><div class="line">};</div><div class="line"></div><div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> help()</div><div class="line">{</div><div class="line">    cout &lt;&lt; <span class="stringliteral">&quot;\nThis example shows how to use the \&quot;Phase unwrapping module\&quot; to unwrap a phase map&quot;</span></div><div class="line">            <span class="stringliteral">&quot; saved in a yaml file (see extra_data\\phase_unwrapping\\data\\wrappedpeaks.yml).&quot;</span></div><div class="line">            <span class="stringliteral">&quot; The mat name in the file should be \&quot;phaseValue\&quot;. The result is saved in a yaml file&quot;</span></div><div class="line">            <span class="stringliteral">&quot; too. Two images (wrapped.png and output_name.png) are also created&quot;</span></div><div class="line">            <span class="stringliteral">&quot; for visualization purpose.&quot;</span></div><div class="line">            <span class="stringliteral">&quot;\nTo call: ./example_phase_unwrapping_unwrap &lt;input_path&gt; &lt;output_unwrapped_name&gt; \n&quot;</span></div><div class="line">         &lt;&lt; endl;</div><div class="line">}</div><div class="line"><span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)</div><div class="line">{</div><div class="line">    <a class="code" href="../../d6/d86/structcv_1_1phase__unwrapping_1_1HistogramPhaseUnwrapping_1_1Params.html">phase_unwrapping::HistogramPhaseUnwrapping::Params</a> <a class="code" href="../../d1/dae/namespacecv_1_1gapi_1_1ie.html#a3ab1729bcaf2d08e30dd2bc645410908">params</a>;</div><div class="line"></div><div class="line">    <a class="code" href="../../d0/d2e/classcv_1_1CommandLineParser.html">CommandLineParser</a> parser(argc, argv, keys);</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> inputPath = parser.get&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(0);</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> outputUnwrappedName = parser.get&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(1);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>( inputPath.empty() || outputUnwrappedName.empty() )</div><div class="line">    {</div><div class="line">        help();</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line">    <a class="code" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> fsInput(inputPath, <a class="code" href="../../da/d56/classcv_1_1FileStorage.html#a973e41cb75ef6230412a567723b7482daa0dcc459c4d100c35ccfa9a643827bed">FileStorage::READ</a>);</div><div class="line">    <a class="code" href="../../da/d56/classcv_1_1FileStorage.html">FileStorage</a> fsOutput(outputUnwrappedName + <span class="stringliteral">&quot;.yml&quot;</span>, <a class="code" href="../../da/d56/classcv_1_1FileStorage.html#a973e41cb75ef6230412a567723b7482da747a241cefee7b8af34c3d804c864ad6">FileStorage::WRITE</a>);</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> wPhaseMap;</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> uPhaseMap;</div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> reliabilities;</div><div class="line">    fsInput[<span class="stringliteral">&quot;phaseValues&quot;</span>] &gt;&gt; wPhaseMap;</div><div class="line">    fsInput.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e">release</a>();</div><div class="line">    params.<a class="code" href="../../d6/d86/structcv_1_1phase__unwrapping_1_1HistogramPhaseUnwrapping_1_1Params.html#a4a47c8f96db147266a877be2697046c2">width</a> = wPhaseMap.cols;</div><div class="line">    params.<a class="code" href="../../d6/d86/structcv_1_1phase__unwrapping_1_1HistogramPhaseUnwrapping_1_1Params.html#a6cafef26e8a22e1b738baa21718da4b5">height</a> = wPhaseMap.rows;</div><div class="line"></div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr&lt;phase_unwrapping::HistogramPhaseUnwrapping&gt;</a> phaseUnwrapping = <a class="code" href="../../d5/d7d/classcv_1_1phase__unwrapping_1_1HistogramPhaseUnwrapping.html#a36b20dc34658c5cff6790775f949187f">phase_unwrapping::HistogramPhaseUnwrapping::create</a>(params);</div><div class="line"></div><div class="line">    phaseUnwrapping-&gt;unwrapPhaseMap(wPhaseMap, uPhaseMap);</div><div class="line">    fsOutput &lt;&lt; <span class="stringliteral">&quot;phaseValues&quot;</span> &lt;&lt; uPhaseMap;</div><div class="line">    fsOutput.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e">release</a>();</div><div class="line"></div><div class="line">    phaseUnwrapping-&gt;getInverseReliabilityMap(reliabilities);</div><div class="line"></div><div class="line">    <a class="code" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> uPhaseMap8, wPhaseMap8, reliabilities8;</div><div class="line">    wPhaseMap.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b">convertTo</a>(wPhaseMap8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 255, 128);</div><div class="line">    uPhaseMap.convertTo(uPhaseMap8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 1, 128);</div><div class="line">    reliabilities.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b">convertTo</a>(reliabilities8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 255,128);</div><div class="line"></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;reliabilities&quot;</span>, reliabilities);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;wrapped phase map&quot;</span>, wPhaseMap8);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;unwrapped phase map&quot;</span>, uPhaseMap8);</div><div class="line"></div><div class="line">    <a class="code" href="../../d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce">imwrite</a>(outputUnwrappedName + <span class="stringliteral">&quot;.png&quot;</span>, uPhaseMap8);</div><div class="line">    <a class="code" href="../../d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce">imwrite</a>(<span class="stringliteral">&quot;reliabilities.png&quot;</span>, reliabilities8);</div><div class="line"></div><div class="line">    <span class="keywordtype">bool</span> loop = <span class="keyword">true</span>;</div><div class="line">    <span class="keywordflow">while</span>( loop )</div><div class="line">    {</div><div class="line">        <span class="keywordtype">char</span> key = (char)<a class="code" href="../../d7/dfc/group__highgui.html#ga5628525ad33f52eab17feebcfba38bd7">waitKey</a>(0);</div><div class="line">        <span class="keywordflow">if</span>( key == 27 )</div><div class="line">        {</div><div class="line">            loop = <span class="keyword">false</span>;</div><div class="line">        }</div><div class="line">    }</div><div class="line">    <span class="keywordflow">return</span> 0;</div><div class="line">}</div></div><!-- fragment --><h2>Explanation </h2>
<p>To use this example, wrapped phase map values should be stored in a yml file as CV_32FC1 Mat, under the name "phaseValues". Path to the data and a name to save the unwrapped phase map must be set in the command line. The results are saved with floating point precision in a yml file and as an 8-bit image for visualization purpose.</p>
<p>Some parameters can be chosen by the user:</p><ul>
<li>histThresh is a parameter used to divide the histogram in two parts. Bins before histThresh are smaller than the ones after histThresh. (Default value is 3*pi*pi).</li>
<li>nbrOfSmallBins is the number of bins between 0 and histThresh. (Default value is 10).</li>
<li>nbrOfLargeBins is the number of bins between histThresh and 32*pi*pi. (Default value is 5).</li>
</ul>
<div class="fragment"><div class="line"><a class="code" href="../../d4/d41/namespacecv_1_1dynafu.html#afe352b7045bf5f1496c2d8dd2a09a764">phase_unwrapping::HistogramPhaseUnwrapping::Params</a> <a class="code" href="../../d1/dae/namespacecv_1_1gapi_1_1ie.html#a3ab1729bcaf2d08e30dd2bc645410908">params</a>;</div><div class="line"></div><div class="line">    CommandLineParser parser(argc, argv, keys);</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> inputPath = parser.get&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(0);</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> outputUnwrappedName = parser.get&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(1);</div><div class="line">    <a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> outputWrappedName = parser.get&lt;<a class="code" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>&gt;(2);</div><div class="line"></div><div class="line">    <span class="keywordflow">if</span>( inputPath.empty() || outputUnwrappedName.empty() )</div><div class="line">    {</div><div class="line">        help();</div><div class="line">        <span class="keywordflow">return</span> -1;</div><div class="line">    }</div><div class="line">    FileStorage fsInput(inputPath, FileStorage::READ);</div><div class="line">    FileStorage fsOutput(outputUnwrappedName + <span class="stringliteral">&quot;.yml&quot;</span>, FileStorage::WRITE);</div><div class="line"></div><div class="line">    Mat wPhaseMap;</div><div class="line">    Mat uPhaseMap;</div><div class="line">    Mat reliabilities;</div><div class="line">    fsInput[<span class="stringliteral">&quot;phaseValues&quot;</span>] &gt;&gt; wPhaseMap;</div><div class="line">    fsInput.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#ae48d4913285518e2c21a3457017e716e">release</a>();</div><div class="line">    params.width = wPhaseMap.cols;</div><div class="line">    params.height = wPhaseMap.rows;</div><div class="line">    Ptr&lt;phase_unwrapping::HistogramPhaseUnwrapping&gt; phaseUnwrapping = phase_unwrapping::HistogramPhaseUnwrapping::create(params);</div></div><!-- fragment --><p> The wrapped phase map is unwrapped and the result is saved in a yml file. We can also get the reliabilities map for visualization purpose. The unwrapped phase map and the reliabilities map are converted to 8-bit images in order to be saved as png files.</p>
<div class="fragment"><div class="line">phaseUnwrapping-&gt;unwrapPhaseMap(wPhaseMap, uPhaseMap);</div><div class="line">    fsOutput &lt;&lt; <span class="stringliteral">&quot;phaseValues&quot;</span> &lt;&lt; uPhaseMap;</div><div class="line">    fsOutput.release();</div><div class="line"></div><div class="line">    phaseUnwrapping-&gt;getInverseReliabilityMap(reliabilities);</div><div class="line"></div><div class="line">    Mat uPhaseMap8, wPhaseMap8, reliabilities8;</div><div class="line">    wPhaseMap.<a class="code" href="../../d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b">convertTo</a>(wPhaseMap8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 255, 128);</div><div class="line">    uPhaseMap.convertTo(uPhaseMap8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 1, 128);</div><div class="line">    reliabilities.convertTo(reliabilities8, <a class="code" href="../../d1/d1b/group__core__hal__interface.html#ga32b18d904ee2b1731a9416a8eef67d06">CV_8U</a>, 255,128);</div><div class="line"></div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;reliabilities&quot;</span>, reliabilities);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;wrapped phase map&quot;</span>, wPhaseMap8);</div><div class="line">    <a class="code" href="../../d7/dfc/group__highgui.html#ga453d42fe4cb60e5723281a89973ee563">imshow</a>(<span class="stringliteral">&quot;unwrapped phase map&quot;</span>, uPhaseMap8);</div><div class="line"></div><div class="line">    <a class="code" href="../../d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce">imwrite</a>(outputUnwrappedName + <span class="stringliteral">&quot;.png&quot;</span>, uPhaseMap8);</div><div class="line">    <a class="code" href="../../d4/da8/group__imgcodecs.html#gabbc7ef1aa2edfaa87772f1202d67e0ce">imwrite</a>(<span class="stringliteral">&quot;reliabilities.png&quot;</span>, reliabilities8);</div></div><!-- fragment --> </div></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:39 for OpenCV by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
